home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group93c.txt
/
000038_icon-group-sender _Mon Aug 30 03:13:31 1993.msg
< prev
next >
Wrap
Internet Message Format
|
1994-02-02
|
2KB
Received: from owl.CS.Arizona.EDU by cheltenham.cs.arizona.edu; Mon, 30 Aug 1993 07:41:14 MST
Received: by owl.cs.arizona.edu; Mon, 30 Aug 1993 07:41:13 MST
Date: 30 Aug 93 03:13:31 GMT
From: agate!howland.reston.ans.net!darwin.sura.net!sgiblab!wetware!indetech!pacbell!boo!seer!fxg@ucbvax.Berkeley.EDU (Francis X. Guidry)
Organization: Brad Lanam, Walnut Creek, CA
Subject: Re: system() function
Message-Id: <CCJyAK.2MF@seer.gentoo.com>
References: <1993Aug28.000650.682@jcnpc.cmhnet.org>
Sender: icon-group-request@cs.arizona.edu
To: icon-group@cs.arizona.edu
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
In article <1993Aug28.000650.682@jcnpc.cmhnet.org> jms@jcnpc.cmhnet.org (John M. Salimbene) writes:
> I have a 286 running under dos 3.3. I use the system() function
>to issue the VOL command to dos to see the volume label of the disk
>in drive A:. System() returns the dos exit code and not the response
>returned by the VOL command. Therefore x := system("Vol") does not
>capture the volume label as returned by Vol but rather captures 0,
>which is the exit code.
> Is there a way under ICON 8.0 to capture the volume label returned
>by the dos Vol command as a string? If so, how?
Redirect the output of the vol command to a file, then read the file.
system("vol >$$$.tmp")
f := open("$$$.tmp")
x := !f
system("del $$$.tmp")
Actually, you'll have to do a bit of scanning to isolate just the
volume label, but this should give you the idea.
Fran